package com.hfy.user;

import com.hfy.user.ws.WsPrivateMessage;
import com.hfy.user.ws.WsSession;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.AutoConfigurationPackages;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.List;

@SpringBootApplication
@EnableDiscoveryClient
@MapperScan("com.hfy.user.mapper")

public class MusicServiceUserApplication {

    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication(MusicServiceUserApplication.class);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
        //解决WebSocket不能注入的问题
        WsPrivateMessage.setApplicationContext(configurableApplicationContext);
        WsSession.setApplicationContext(configurableApplicationContext);



    }

}
